#include <stdio.h>
int main(){
    printf("input a number for loop:");
    int num=0;
    scanf("%d",&num);
    int sum=0;    
    for(int i=1;i<=num;i++){
        if(i==num){
            goto label;
        }
        sum+=i;
    }    
label:
    printf("sum=%d",sum);
    return 0;
}